package com.wwtech.epp.ui.activity.work.module;

import com.wwtech.epp.data.api.HttpAPIWrapper;
import com.wwtech.epp.ui.activity.base.ActivityScope;
import com.wwtech.epp.ui.activity.work.TaskManageActivity;
import com.wwtech.epp.ui.activity.work.contract.TaskManageContract;
import com.wwtech.epp.ui.activity.work.presenter.TaskManagePresenter;

import dagger.Module;
import dagger.Provides;

/**
 * @author hzp
 * @Package com.wwtech.epp.ui.activity.work
 * @Description: The moduele of TaskManageActivity, provide field for TaskManageActivity
 * @date 2017/09/16 15:45:21
 */
@Module
public class TaskManageModule {
    private final TaskManageContract.View mView;


    public TaskManageModule(TaskManageContract.View view) {
        this.mView = view;
    }

    @Provides
    @ActivityScope
    public TaskManagePresenter provideTaskManagePresenter(HttpAPIWrapper httpAPIWrapper, TaskManageActivity mActivity) {
        return new TaskManagePresenter(httpAPIWrapper, mView, mActivity);
    }

    @Provides
    @ActivityScope
    public TaskManageActivity provideTaskManageActivity() {
        return (TaskManageActivity) mView;
    }
}